Repository navigation
Conversation
관리자 웹의 공지 폼이 고정 여부를 등록·수정과 함께 보내고, 수정 화면이 기존 공지와 수정 시각을 불러와야 해서 맞춘다.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
github-actions
Bot
requested review from
leegain1,
sangrae2325,
tnals0924 and
xeoxxn
October 18, 2026 16:24
This was referenced Oct 18, 2026
jjunh33
added this pull request to stack #147
October 18, 2026 17:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
관리자 웹(
stream-admin-web)의 공지 화면과 공지 관리자 API(#104)가 맞지 않습니다.pinned를 읽지 않으며 고정은PATCH /{noticeId}/pin으로만 바꿉니다. 지금 연결하면 스위치가 오류 없이 무시됩니다.updatedAt을 요구합니다. 그런데 관리자용 조회가 없고 학생 앱 응답에도pinned와updatedAt이 없어서 수정 화면이 값을 얻을 방법이 없습니다.❓ 왜 해결해야 하나요?
관리자 웹이 공지 API를 연동하려면 두 가지가 먼저 있어야 합니다. #104의 수정 API는
updatedAt을 받아올 조회가 없으면 실제로 쓸 수 없는 상태입니다.⭐ 어떻게 해결했나요?
pinned를 작성·수정 요청에 추가(필수).NoticeCreateCommand·NoticeUpdateCommand·Notice가 함께 받습니다. 목록에서 빠르게 전환할 때 쓰도록PATCH /{noticeId}/pin은 그대로 둡니다.GET /v1/admin/notices:keyword(제목 검색),page(0부터),size(1~100, 기본 20). 고정 우선, 최신순이고 항목은noticeId,title,category,pinned,createdAt입니다. 검색은 물품 검색과 같은LOCATE방식이라%·_도 글자 그대로 찾습니다. 공백 검색어는 조건 없음으로 취급합니다(NoticeServiceImpl.search).GET /v1/admin/notices/{noticeId}:title,content,category,pinned,images[{fileId, fileUrl}],attachments[{fileId, fileName, fileUrl}],createdAt,updatedAt(KST 기준 epoch 밀리초). 수정할 때imageFileIds로 되돌려 보낼 수 있게 파일 ID를 함께 내려줍니다. 공지와 파일 두 도메인을 조합하므로AdminNoticeReadUseCase가 맡습니다.DateUtil로 통일:toEpochMillis/fromEpochMillis를 추가해 상세 응답(내보내기)과 수정 요청(받기)이 같은 기준을 쓰게 했습니다. 이전에는 수정 요청 쪽에만 변환이 있었습니다.🧩 이 PR의 한계 & 트레이드오프
NoticeJpaRepository.search는 dev에서 호출해 봐야 합니다. 물품 검색(LOCATE)과 열린피드백 목록(countQuery가 있는Page조회)의 패턴을 그대로 따랐고, 쿼리가 틀리면 앱 기동이 실패하므로 dev 배포 후 가장 먼저 확인이 필요합니다.TextArea로 입력받아 어긋나 있으며, 학생 앱이 렌더링하는 방식을 확인한 뒤 정할 일이라 이번에 건드리지 않았습니다.updatedAt비교가 완전한 원자적 보호가 아닌 점(#104에서 밝힌 한계)은 그대로입니다.⛓️ 기존 기능에 미치는 영향
pinned가 필수로 추가됩니다. [Feat/#103] 게시판(공지) 관리자 API 추가 #104 이후 이 API를 호출하는 클라이언트는 없습니다(관리자 웹은 아직 목업입니다).NoticeService·NoticeRepository에search가 추가됐고,NoticeCreateCommand·NoticeUpdateCommand에pinned가 추가됐습니다. 학생 앱 공지 조회는 영향이 없습니다.🔀 Edge Case & 실패 시나리오
pinned누락INVALID_INPUT("고정 여부를 입력해 주세요.")NOTICE_UPDATE_CONFLICT(이때pinned도 바뀌지 않음)size가 1~100 밖 /page음수INVALID_INPUTNOTICE_NOT_FOUNDkeyword가 비었거나 공백📋 검토한 대안과 선택 이유
pinned를 선택값(미지정이면 유지)으로 받기: 수정이 전체 교체(PUT)라 누락이 곧 의도 불명확한 해제가 될 수 있어서 필수로 했습니다.pinned와updatedAt이 없고 제목 검색·페이지네이션도 없어서 제외했습니다.PageParams/PageResponse)으로 했습니다.💬 리뷰 포인트
[r]NoticeJpaRepository.search의 JPQL이 dev에서 정상 기동·조회되는지[c]updatedAt변환이 KST 기준이라는 가정(DateUtil). DB와 앱의 타임존 설정이 코드에 없고, 클라이언트는 상세에서 받은 값을 그대로 되돌려 보내기만 하면 됩니다.[c]pinned를 필수로 둔 것. 선택값으로 바꾸는 게 낫다면 알려주세요.[a]상세 응답 클래스에Admin접두사를 붙인 것(학생 앱NoticeDetailResponse와 Swagger 스키마 이름이 겹치지 않게)